StringKeyDictionary<TValue>
StringKeyDictionary<TValue>
Events
event DidInsertModelForKey<TValue> didInsertModelForKey
An event that fires when a model is successfully added to the collection by any client.
event DidRemoveModelForKey<TValue> didRemoveModelForKey
An event that fires when a model is successfully removed from the collection by any client.
event DidClearAllModels<TValue> didClearAllModels
An event that fires when the collection is cleared by any client.
Properties
TValue Item { get; }
Retrieve a model given a specific key.
int Count { get; }
The number of models currently stored in the collection.
Methods
void Insert(string key, TValue value, Action<bool> completionHandler)
Insert a model into the collection. The model will not be inserted until the server confirms the transaction.
void Remove(string key, Action<bool> completionHandler)
Remove a model from the collection. The model will not be removed until the server confirms the transaction.
void Clear(Action<bool> completionHandler)
Clear all models from the collection. Models will not be removed until the server confirms the transaction.
This operation will be rejected if any keys have been modified before the clear operation reaches the server.
bool TryGetValue(string key, TValue& value)
Attempt to retrieve a value from the collection.
This method will not throw an exception if the key is not found.
A boolean indicating whether the key was found within the collection.
bool ContainsKey(string key)
Check if a key exists within the collection.
A boolean indicating whether the key was found within the collection.
bool ContainsValue(TValue value)
Check if a model instance is contained in the collection.
This method has equivalent performance to Dictionary<T, V>.ContainsValue().
A boolean indicating whether the value was found within the collection.
IEnumerator<KeyValuePair<string, TValue>> GetEnumerator()
uint GetCollectionTypeID()